<html>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
      <head><title>Add new alarm</title></head>
      <body>
        <div id="add_form" >
          <h:form>
              <table>
                  <tr>
                      <td>Title: </td>
                      <td><h:inputText value="#{controller.title}" size="35"/></td>
                  </tr>
                  <tr>
                      <td>Type:  </td>            
                      <td>
                          <h:selectOneMenu value="#{controller.type}">
                              <f:selectItems value="#{types.types}"/>
                          </h:selectOneMenu>
                      </td>
                  </tr>
                  <tr>
                      <td>Occurrence:</td>
                      <td>
                          <h:selectOneMenu value="#{controller.occurrence}">
                              <f:selectItems value="#{occur.occur}"/>
                          </h:selectOneMenu>
                          
                          <h:inputText value="#{controller.date}">
                              <f:convertDateTime pattern="dd/MM/yy"/>
                          </h:inputText>
                      </td>
                  </tr>
                  <tr>
                      <td>Time: <span style="font-style: italic;">[hh:mm]</span></td>
                      <td>
                        <h:inputText value="#{controller.time}"/>
                      </td>
                  </tr>
                  <tr>
                      <td>Reminder Note:</td>
                      <td>
                          <h:inputTextarea value="#{controller.note}" rows="3" cols="35"/>
                      </td>
                  </tr>
                  <tr>
                      <td>Status:  </td>
                      <td>
                          <h:selectOneMenu value="#{controller.status}">
                              <f:selectItems value="#{statuses.statuses}"/>
                          </h:selectOneMenu>
                      </td>
                  </tr>
              </table>
              <p>
                  <h:commandButton value="Add" action="#{controller.save}"/>
              </p>
          </h:form>
        </div>
      </body>
</f:view>
</html>